/*
 * Copyright (c) 2019.11，华乘电气科技有限公司
 * All rights reserved.
 *
 * 文件名称：prpsprpdspectrumprivate.h
 * 
 * 初始版本：1.0
 * 作者：洪澄
 * 创建日期：2019/11/08
 * 摘要：prpsprpd图谱数据私有定义
 * 当前版本：1.0
 */

#pragma once

#include <QString>
#include <vector>

namespace DataSpecificationGW
{
    struct PRPSExtInformationPrivate
    {
        friend class PRPSSpectrum;

        quint8 ucAmpUnit;
        float fAmpLowerLimit;
        float fAmpUpperLimit;
        quint8 ucFrequencyBand;
        float fFrequencyLowerLimit;
        float fFequencyUpperLimit;
        qint32 iPhaseWindowCount;
        qint32 iQuantizedAmplitude;
        qint32 iPowerFreqCycleCount;
        std::vector<quint8 > vecPDTypeProbability;
        QString qstrBGFileName;
        quint8 ucDataJudgmentFlag;
        qint16 sGain;
        quint8 ucSyncSource;
        quint8 ucSyncState;
        float fSyncFrequency;
        quint8 ucDischargeSeverity;
        quint8 ucDenoisingThreshold; // 去噪阈值

        void skipAmpUnit() { bSkipAmpUnit = true; }
        void skipAmpLowerLimit() { bSkipAmpLowerLimit = true; }
        void skipAmpUpperLimit() { bSkipAmpUpperLimit = true; }
        void skipFrequencyBand() { bSkipFrequencyBand = true; }
        void skipFrequencyLowerLimit() { bSkipFrequencyLowerLimit = true; }
        void skipFequencyUpperLimit() { bSkipFequencyUpperLimit = true; }
        void skipPhaseWindowCount() { bSkipPhaseWindowCount = true; }
        void skipQuantizedAmplitude() { bSkipQuantizedAmplitude = true; }
        void skipPowerFreqCycleCount() { bSkipPowerFreqCycleCount = true; }
        void skipPDTypeProbability() { bSkipPDTypePR = true; }
        void skipBGFileName() { bSkipBGFileName = true; }
        void skipDataJudgmentFlag() { bSkipDataJudgmentFlag = true; }
        void skipGain() { bSkipGain = true; }
        void skipSyncSource() { bSkipSyncSource = true; }
        void skipSyncState() { bSkipSyncState = true; }
        void skipSyncFrequency() { bSkipSyncFrequency = true; }
        void skipDischargeSeverity() { bSkipDischargeSeverity = true; }
        void skipDenoisingThreshold() { bSkipDenoisingThreshold = true; }

        bool hasAmpUnit() const { return bHasAmpUnit; }
        bool hasAmpLowerLimit() const { return bHasAmpLowerLimit; }
        bool hasAmpUpperLimit() const { return bHasAmpUpperLimit; }
        bool hasFrequencyBand() const { return bHasFrequencyBand; }
        bool hasFrequencyLowerLimit() const { return bHasFrequencyLowerLimit; }
        bool hasFequencyUpperLimit() const { return bHasFequencyUpperLimit; }
        bool hasPhaseWindowCount() const { return bHasPhaseWindowCount; }
        bool hasQuantizedAmplitude() const { return bHasQuantizedAmplitude; }
        bool hasPowerFreqCycleCount() const { return bHasPowerFreqCycleCount; }
        bool hasPDTypeProbability() const { return bHasPDTypeProbability; }
        bool hasBGFileName() const { return bHasBGFileName; }
        bool hasDataJudgmentFlag() const { return bHasDataJudgmentFlag; }
        bool hasGain() const { return bHasgain; }
        bool hasSyncSource() const { return bHasSyncSource; }
        bool hasSyncState() const { return bHasSyncState; }
        bool hasSyncFrequency() const { return bHasSyncFrequency; }
        bool hasDischargeSeverity() const { return bHasDischargeSeverity; }
        bool hasDenoisingThreshold() const { return bHasDenoisingThreshold; }

        PRPSExtInformationPrivate();
        PRPSExtInformationPrivate& operator=(const PRPSExtInformationPrivate& stPRPSExtInformationPrivate);
        bool operator==(const PRPSExtInformationPrivate& stPRPSExtInformationPrivate) const;

    private:
        bool bSkipAmpUnit;
        bool bSkipAmpLowerLimit;
        bool bSkipAmpUpperLimit;
        bool bSkipFrequencyBand;
        bool bSkipFrequencyLowerLimit;
        bool bSkipFequencyUpperLimit;
        bool bSkipPhaseWindowCount;
        bool bSkipQuantizedAmplitude;
        bool bSkipPowerFreqCycleCount;
        bool bSkipPDTypePR;
        bool bSkipBGFileName;
        bool bSkipDataJudgmentFlag;
        bool bSkipGain;
        bool bSkipSyncSource;
        bool bSkipSyncState;
        bool bSkipSyncFrequency;
        bool bSkipDischargeSeverity;
        bool bSkipDenoisingThreshold;

        bool bHasAmpUnit;
        bool bHasAmpLowerLimit;
        bool bHasAmpUpperLimit;
        bool bHasFrequencyBand;
        bool bHasFrequencyLowerLimit;
        bool bHasFequencyUpperLimit;
        bool bHasPhaseWindowCount;
        bool bHasQuantizedAmplitude;
        bool bHasPowerFreqCycleCount;
        bool bHasPDTypeProbability;
        bool bHasBGFileName;
        bool bHasDataJudgmentFlag;
        bool bHasgain;
        bool bHasSyncSource;
        bool bHasSyncState;
        bool bHasSyncFrequency;
        bool bHasDischargeSeverity;
        bool bHasDenoisingThreshold;
    };

    struct PRPSDataPrivate
    {
        friend class PRPSSpectrum;

        QByteArray qbaPDSpectrumData;

        void skipPDSpectrumData() { bSkipPDSpectrumData = true; }

        bool hasPDSpectrumData() const { return bHasPDSpectrumData; }

        PRPSDataPrivate();
        PRPSDataPrivate& operator=(const PRPSDataPrivate& stPRPSDataPrivate);
        bool operator==(const PRPSDataPrivate& stPRPSDataPrivate) const;

    private:
        bool bSkipPDSpectrumData;

        bool bHasPDSpectrumData;
    };


    struct PRPDExtInformationPrivate
    {
        friend class PRPDSpectrum;

        quint8 ucAmpUnit;
        float fAmpLowerLimit;
        float fAmpUpperLimit;
        quint8 ucFrequencyBand;
        float fFrequencyLowerLimit;
        float fFequencyUpperLimit;
        qint32 iPhaseWindowCount;
        qint32 iQuantizedAmplitude;
        qint32 iPowerFreqCycleCount;
        std::vector<quint8 > vecPDTypeProbability;
        QString qstrBGFileName;
        quint8 ucDataJudgmentFlag;
        qint16 sGain;
        quint8 ucSyncSource;
        quint8 ucSyncState;
        float fSyncFrequency;
        quint8 ucDischargeSeverity;
        quint8 ucDenoisingThreshold; // 去噪阈值

        void skipAmpUnit() { bSkipAmpUnit = true; }
        void skipAmpLowerLimit() { bSkipAmpLowerLimit = true; }
        void skipAmpUpperLimit() { bSkipAmpUpperLimit = true; }
        void skipFrequencyBand() { bSkipFrequencyBand = true; }
        void skipFrequencyLowerLimit() { bSkipFrequencyLowerLimit = true; }
        void skipFequencyUpperLimit() { bSkipFequencyUpperLimit = true; }
        void skipPhaseWindowCount() { bSkipPhaseWindowCount = true; }
        void skipQuantizedAmplitude() { bSkipQuantizedAmplitude = true; }
        void skipPowerFreqCycleCount() { bSkipPowerFreqCycleCount = true; }
        void skipPDTypeProbability() { bSkipPDTypePR = true; }
        void skipBGFileName() { bSkipBGFileName = true; }
        void skipDataJudgmentFlag() { bSkipDataJudgmentFlag = true; }
        void skipGain() { bSkipGain = true; }
        void skipSyncSource() { bSkipSyncSource = true; }
        void skipSyncState() { bSkipSyncState = true; }
        void skipSyncFrequency() { bSkipSyncFrequency = true; }
        void skipDischargeSeverity() { bSkipDischargeSeverity = true; }
        void skipDenoisingThreshold() { bSkipDenoisingThreshold = true; }

        bool hasAmpUnit() const { return bHasAmpUnit; }
        bool hasAmpLowerLimit() const { return bHasAmpLowerLimit; }
        bool hasAmpUpperLimit() const { return bHasAmpUpperLimit; }
        bool hasFrequencyBand() const { return bHasFrequencyBand; }
        bool hasFrequencyLowerLimit() const { return bHasFrequencyLowerLimit; }
        bool hasFequencyUpperLimit() const { return bHasFequencyUpperLimit; }
        bool hasPhaseWindowCount() const { return bHasPhaseWindowCount; }
        bool hasQuantizedAmplitude() const { return bHasQuantizedAmplitude; }
        bool hasPowerFreqCycleCount() const { return bHasPowerFreqCycleCount; }
        bool hasPDTypeProbability() const { return bHasPDTypeProbability; }
        bool hasBGFileName() const { return bHasBGFileName; }
        bool hasDataJudgmentFlag() const { return bHasDataJudgmentFlag; }
        bool hasGain() const { return bHasgain; }
        bool hasSyncSource() const { return bHasSyncSource; }
        bool hasSyncState() const { return bHasSyncState; }
        bool hasSyncFrequency() const { return bHasSyncFrequency; }
        bool hasDischargeSeverity() const { return bHasDischargeSeverity; }
        bool hasDenoisingThreshold() const { return bHasDenoisingThreshold; }

        PRPDExtInformationPrivate();
        PRPDExtInformationPrivate& operator=(const PRPDExtInformationPrivate& stPRPDExtInformationPrivate);
        bool operator==(const PRPDExtInformationPrivate& stPRPDExtInformationPrivate) const;

    private:
        bool bSkipAmpUnit;
        bool bSkipAmpLowerLimit;
        bool bSkipAmpUpperLimit;
        bool bSkipFrequencyBand;
        bool bSkipFrequencyLowerLimit;
        bool bSkipFequencyUpperLimit;
        bool bSkipPhaseWindowCount;
        bool bSkipQuantizedAmplitude;
        bool bSkipPowerFreqCycleCount;
        bool bSkipPDTypePR;
        bool bSkipBGFileName;
        bool bSkipDataJudgmentFlag;
        bool bSkipGain;
        bool bSkipSyncSource;
        bool bSkipSyncState;
        bool bSkipSyncFrequency;
        bool bSkipDischargeSeverity;
        bool bSkipDenoisingThreshold;

        bool bHasAmpUnit;
        bool bHasAmpLowerLimit;
        bool bHasAmpUpperLimit;
        bool bHasFrequencyBand;
        bool bHasFrequencyLowerLimit;
        bool bHasFequencyUpperLimit;
        bool bHasPhaseWindowCount;
        bool bHasQuantizedAmplitude;
        bool bHasPowerFreqCycleCount;
        bool bHasPDTypeProbability;
        bool bHasBGFileName;
        bool bHasDataJudgmentFlag;
        bool bHasgain;
        bool bHasSyncSource;
        bool bHasSyncState;
        bool bHasSyncFrequency;
        bool bHasDischargeSeverity;
        bool bHasDenoisingThreshold;
    };

    struct PRPDDataPrivate
    {
        friend class PRPDSpectrum;

        QByteArray qbaPDSpectrumData;

        void skipPDSpectrumData() { bSkipPDSpectrumData = true; }

        bool hasPDSpectrumData() const { return bHasPDSpectrumData; }

        PRPDDataPrivate();
        PRPDDataPrivate& operator=(const PRPDDataPrivate& stPRPDDataPrivate);
        bool operator==(const PRPDDataPrivate& stPRPDDataPrivate) const;

    private:
        bool bSkipPDSpectrumData;

        bool bHasPDSpectrumData;
    };
}
